]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowPreview: Unset selected if window was clicked to switch workspaces
authorSebastian Keller <skeller@gnome.org>
Wed, 24 Feb 2021 22:22:52 +0000 (23:22 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Mar 2021 14:45:50 +0000 (14:45 +0000)
This is used to detect whether a click was short enough to select a
window and activate it or long enough to start a drag. Usually when
clicking on a window and selecting it, this leaves the overview, but
when clicking on a window on a neighboring workspace, the overview is
kept open, but selected is not unset in this case. So all attempts at
dragging the window after using it to switch workspaces will fail.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3783

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1717>

js/ui/windowPreview.js

index a27d0586f46d04f9de07e8891e431f05adbef37e..bb97ebc6358704a1fb30e24800e41787776ee50c 100644 (file)
@@ -819,8 +819,10 @@ var WindowPreview = GObject.registerClass({
             // run - make sure to not start a drag in that case
             this._longPressLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
                 delete this._longPressLater;
-                if (this._selected)
+                if (this._selected) {
+                    this._selected = false;
                     return;
+                }
                 let [x, y] = action.get_coords();
                 action.release();
                 this._draggable.startDrag(x, y, global.get_current_time(), this._dragTouchSequence, event.get_device());